<script setup>
import { ref, watch } from 'vue'
// import { createBlobUrl } from '@renderer/utils'

const _props = defineProps({
  file: {
    type: Object,
    default: () => {}
  }
})

const src = ref('')

watch(
  () => _props.file,
  (newVal) => {
    // src.value = createBlobUrl(newVal.buffer, newVal._mediaType)
    src.value = newVal.filePath
  },
  { immediate: true }
)
</script>

<template>
  <div class="overflow-hidden">
    <video :src="src" controls class="w-36 h-full"></video>
  </div>
</template>

<style lang="scss" scoped></style>
